package com.epcs.model.dto;
// Generated 12:25:30 14-02-2014 by Hibernate Tools 3.2.1.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Event generated by hbm2java
 */
@Entity
@Table(name = "event", catalog = "epcs")
public class Event implements java.io.Serializable {

    private Integer eventId;
    private Account account;
    private Eventcategory eventcategory;
    private Event originalEvent;
    private String organizer;
    private String startTime;
    private String endTime;
    private String description;
    private String status;
    private String updated;
    private Integer sequence;
    private Boolean dirty;
    private String location;
    private String title;
    private Integer reminderTime;
    private Boolean isRecurrent;
    private Boolean isAllDayEvent;
    private Boolean isNotified;
    private String googleEventId;
    private String outlookEventId;
    private String gcalendarId;
    private String ocalendarId;
    private String recurrence;
    private String visibility;
    private Set<Event> events = new HashSet<Event>(0);
    private Set<Comment> comments = new HashSet<Comment>(0);

    public Event() {
    }

    public Event(Account account, Eventcategory eventcategory, Event originalEvent, String organizer, String startTime, String endTime, String description, String status, String updated, Integer sequence, Boolean dirty, String location, String title, Integer reminderTime, Boolean isRecurrent, Boolean isAllDayEvent, String googleEventId, String outlookEventId, String gcalendarId, String ocalendarId, String recurrence, String visibility, Set<Event> events, Set<Comment> comments) {
        this.account = account;
        this.eventcategory = eventcategory;
        this.originalEvent = originalEvent;
        this.organizer = organizer;
        this.startTime = startTime;
        this.endTime = endTime;
        this.description = description;
        this.status = status;
        this.updated = updated;
        this.sequence = sequence;
        this.dirty = dirty;
        this.location = location;
        this.title = title;
        this.reminderTime = reminderTime;
        this.isRecurrent = isRecurrent;
        this.isAllDayEvent = isAllDayEvent;
        this.googleEventId = googleEventId;
        this.outlookEventId = outlookEventId;
        this.gcalendarId = gcalendarId;
        this.ocalendarId = ocalendarId;
        this.recurrence = recurrence;
        this.visibility = visibility;
        this.events = events;
        this.comments = comments;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "eventID", unique = true, nullable = false)
    public Integer getEventId() {
        return this.eventId;
    }

    public void setEventId(Integer eventId) {
        this.eventId = eventId;
    }

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "username")
    public Account getAccount() {
        return this.account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "eventCategoryID")
    public Eventcategory getEventcategory() {
        return this.eventcategory;
    }

    public void setEventcategory(Eventcategory eventcategory) {
        this.eventcategory = eventcategory;
    }

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "originalEventID")
    public Event getOriginalEvent() {
        return this.originalEvent;
    }

    public void setOriginalEvent(Event originalEvent) {
        this.originalEvent = originalEvent;
    }

    @Column(name = "organizer", length = 45)
    public String getOrganizer() {
        return this.organizer;
    }

    public void setOrganizer(String organizer) {
        this.organizer = organizer;
    }

    @Column(name = "startTime", length = 50)
    public String getStartTime() {
        return this.startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    @Column(name = "endTime", length = 50)
    public String getEndTime() {
        return this.endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    @Column(name = "description", length = 65535)
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column(name = "status", length = 45)
    public String getStatus() {
        return this.status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(name = "updated", length = 50)
    public String getUpdated() {
        return this.updated;
    }

    public void setUpdated(String updated) {
        this.updated = updated;
    }

    @Column(name = "sequence")
    public Integer getSequence() {
        return this.sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    @Column(name = "dirty")
    public Boolean getDirty() {
        return this.dirty;
    }

    public void setDirty(Boolean dirty) {
        this.dirty = dirty;
    }

    @Column(name = "location", length = 100)
    public String getLocation() {
        return this.location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    @Column(name = "title", length = 200)
    public String getTitle() {
        return this.title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Column(name = "reminder_time")
    public Integer getReminderTime() {
        return this.reminderTime;
    }

    public void setReminderTime(Integer reminderTime) {
        this.reminderTime = reminderTime;
    }

    @Column(name = "isRecurrent")
    public Boolean getIsRecurrent() {
        return this.isRecurrent;
    }

    public void setIsRecurrent(Boolean isRecurrent) {
        this.isRecurrent = isRecurrent;
    }

    @Column(name = "isAllDayEvent")
    public Boolean getIsAllDayEvent() {
        return this.isAllDayEvent;
    }

    public void setIsAllDayEvent(Boolean isAllDayEvent) {
        this.isAllDayEvent = isAllDayEvent;
    }

    @Column(name = "googleEventID", length = 100)
    public String getGoogleEventId() {
        return this.googleEventId;
    }

    public void setGoogleEventId(String googleEventId) {
        this.googleEventId = googleEventId;
    }

    @Column(name = "outlookEventID", length = 100)
    public String getOutlookEventId() {
        return this.outlookEventId;
    }

    public void setOutlookEventId(String outlookEventId) {
        this.outlookEventId = outlookEventId;
    }

    @Column(name = "gCalendarID", length = 100)
    public String getGcalendarId() {
        return this.gcalendarId;
    }

    public void setGcalendarId(String gcalendarId) {
        this.gcalendarId = gcalendarId;
    }

    @Column(name = "oCalendarID", length = 100)
    public String getOcalendarId() {
        return this.ocalendarId;
    }

    public void setOcalendarId(String ocalendarId) {
        this.ocalendarId = ocalendarId;
    }

    @Column(name = "recurrence", length = 100)
    public String getRecurrence() {
        return this.recurrence;
    }

    public void setRecurrence(String recurrence) {
        this.recurrence = recurrence;
    }

    @Column(name = "visibility", length = 45)
    public String getVisibility() {
        return this.visibility;
    }

    public void setVisibility(String visibility) {
        this.visibility = visibility;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "originalEvent")
    public Set<Event> getEvents() {
        return this.events;
    }

    public void setEvents(Set<Event> events) {
        this.events = events;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "event")
    public Set<Comment> getComments() {
        return this.comments;
    }

    public void setComments(Set<Comment> comments) {
        this.comments = comments;
    }

    @Column(name = "isNotified")
	public Boolean getIsNotified() {
		return isNotified;
	}

	public void setIsNotified(Boolean isNotified) {
		this.isNotified = isNotified;
	}
}
